﻿$(function () {
    $(".about .subs img").mouseover(function (e) {
        var src = $(this).attr("src");
        $("#bigimg").attr("src", src);
    });

    $("#addcar").click(function () {
        var $img = $("#bigimg");
        var $cpy = $img.clone();
        $cpy.removeAttr("id");
        $img.parent().append($cpy);
        Tools.moveToShopCard($cpy);
        //
        var rhid = parseInt($("#rhid").attr("data-rhid"));
        var title = $("#tit").text();
        var src = $("#bigimg").attr("data-main");
        var rem = $(".barbx .zrb .remneed").text();
        Tools.addCarItem(rhid, title, src, 1,rem);
    });

    $("#bynow").click(function () {
        var bycount = parseInt($("#bycount").val());
        var rhid = parseInt($("#rhid").attr("data-rhid"));
        Tools.settleSingle(rhid, bycount);
    })
});